#ifndef __GUIEvents__h__
#define __GUIEvents__h__

#include "neiderra/core/Core.h"
#include "neiderra/core/VirtualKeyCodes.h"

namespace neiderra { 
	namespace gui {
		
		class GUIWindow; 
		class EventDispatcher;

		namespace events {

			struct iGUIEvent
			{
				iGUIEvent() {}
				virtual ~iGUIEvent(){}
				
				GUIWindow* pwin;

				virtual void response(EventDispatcher*) =0;
			};

			struct GUIMouseEvent: public iGUIEvent{
				enum MouseButton{
					mb_left,
					mb_middle,
					mb_right,
					mb_4,
					mb_5,
					mb_6,
					mb_7
				};

				enum MouseEvents{
					mouse_down, 
	 				mouse_up, 
	  				mouse_click, 
	   				mouse_move
				};
				
				MouseButton button_num;         // button number
				MouseEvents type;       // event type
				unsigned mx, my;		// mouse pointer coordinates

				virtual void response(EventDispatcher*);
			};


			struct GUIKeyEvent: public iGUIEvent{
				enum KeyboardEvents {
					key_down,
	  				key_up
				};
				int keycode;            // key code
				KeyboardEvents type;    // event type

				virtual void response(EventDispatcher*);
			};

		}
	}
}

#endif
